package com.ry.core.exception;

/**
 * 业务异常类，在控制层或者服务层抛出
 * 
 * @author chengl
 * @Date 2011-8-17
 * @version 1.0
 */
public class BusinessException extends BaseException {

	private static final long serialVersionUID = -8443499461307209843L;

	// 异常标题
	private String errorTitle;

	// 异常发生之后转到处理的链接标题
	private String urlTitle;

	// 异常发生之后转到处理的链接地址
	private String url;

	private String errorCode = "";

	// 异常显示页面按钮名称
	private String buttonName="确定";

	// 异常显示页面按钮事件
	private String buttonClick;

	public BusinessException() {
		super();
	}

	public BusinessException(String message) {
		super(message);
	}

	public BusinessException(String title, String message) {
		super(message);
	}

	public BusinessException(String title, String message, Throwable cause) {
		super(message, cause);
	}

	public BusinessException(String message, Throwable cause) {
		super(message, cause);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.toone.itop.core.exception.ITOPException#getErrorDescription()
	 */
	@Override
	public String getErrorDescription() {
		return this.getMessage();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.toone.itop.core.exception.ITOPException#getErrorTitle()
	 */
	@Override
	public String getErrorTitle() {
		return this.errorTitle;
	}

	public String getUrlTitle() {
		return urlTitle;
	}

	public void setUrlTitle(String urlTitle) {
		this.urlTitle = urlTitle;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public void setErrorTitle(String errorTitle) {
		this.errorTitle = errorTitle;
	}

	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public String getButtonName() {
		return buttonName;
	}

	public void setButtonName(String buttonName) {
		this.buttonName = buttonName;
	}

	public String getButtonClick() {
		return buttonClick;
	}

	public void setButtonClick(String buttonClick) {
		this.buttonClick = buttonClick;
	}

}
